-- GENERATED SPELL FOR [Razorfen Defender] --


function spell0_4442(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_4442', 591, 1)
end

function spell1_4442(pUnit, Event) --@Improved Blocking,Self--
pUnit:FullCastSpellOnTarget(3248,pUnit)
pUnit:RegisterEvent('Sorts_4442', 6299, 1)
end

function spell2_4442(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4442', 8278, 1)
end

function Sorts_4442(pUnit, Event)
local choix_sorts_4442 = math.random(0, 2)
if choix_sorts_4442 == 0 then
pUnit:RegisterEvent('spell0_4442', 1, 1)
end
if choix_sorts_4442 == 1 then
pUnit:RegisterEvent('spell1_4442', 1, 1)
end
if choix_sorts_4442 == 2 then
pUnit:RegisterEvent('spell2_4442', 1, 1)
end
end

function mob4442_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4442', math.random(1500, 3000), 1)
end

function mob4442_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4442_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4442_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4442, 1, 'mob4442_Action')
RegisterUnitEvent(4442, 2, 'mob4442_Leave')
RegisterUnitEvent(4442, 3, 'mob4442_Kill')
RegisterUnitEvent(4442, 4, 'mob4442_Die')
